﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace VisionCloud.Core.Model.Ms
{
    [Table("MsRobot")]
    public partial class MsRobot : BaseEntity
    {
        public enum RobotTypeEnum
        {
            MEASURE = 0 //测量机器人
        }

        public enum EnumRobotStatus
        {
            Unkown = 0,
            Online = 1,
            Offline = 2,
            Wait = 3,
            Work = 4
        }

        [Key]
        [Column(TypeName = "varchar(64)")]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public string RobotId { get; set; }

        /// <summary>
        /// 机器Token字符串
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string Token { get; set; }

        /// <summary>
        /// 机器编码
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string Code { get; set; }

        /// <summary>
        /// 机器别名
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string Alias { get; set; }

        /// <summary>
        /// 机器描述
        /// </summary>
        [Column(TypeName = "varchar(512)")]
        public string Description { get; set; }

        /// <summary>
        /// 机器自定义属性
        /// </summary>
        [Column(TypeName = "jsonb")]
        public string CustomAttr { get; set; }

        /// <summary>
        /// 机器类型
        /// </summary>
        [Column(TypeName = "int4")]
        public RobotTypeEnum Type { get; set; }

        /// <summary>
        /// 机器状态
        /// </summary>
        [Column(TypeName = "int4")]
        public EnumRobotStatus Status { get; set; }

        public virtual MsProjectRobot MsProjectRobot { get; set; }
    }
}